/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       saved_combat.h

	$Header: /game/saved_combat.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( SAVED_COMBAT_H_INCLUDED )
#define SAVED_COMBAT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <iosfwd>
#include "adv_map_point.h"
#include "battlefield_ptr.h"
#include "combat_context_ptr.h"

class	t_adventure_frame;
class	t_adventure_map;
class	t_battlefield_terrain_map;
class	t_combat_window;
class	t_creature_array;
class	t_ownable_garrisonable_adv_object;
enum	t_player_color;
class	t_town;

class t_saved_combat
{
public:
	t_saved_combat();
	explicit t_saved_combat( t_combat_window& window );

	t_battlefield_ptr			get_battlefield();
	t_combat_context*			get_context() const;
	t_battlefield_terrain_map*	get_terrain_map();

	void launch( t_adventure_map* adventure_map, t_adventure_frame* adventure_frame );
	bool read( std::streambuf& stream, t_adventure_map* adventure_map );
	bool write( std::streambuf& stream ) const;
protected:
	t_battlefield_ptr							m_battlefield;
	t_combat_context_ptr						m_context;
	t_counted_ptr<t_battlefield_terrain_map>	m_terrain_map;
};

inline t_battlefield_ptr t_saved_combat::get_battlefield()
{
	return m_battlefield;
}


#endif // SAVED_COMBAT_H_INCLUDED